import { Session } from '/@/utils/storage';
import { useUserInfo } from '/@/stores/userInfo';
import { useRoute } from 'vue-router';
/**
 * 存储微信小程序用户信息
 * @param that
 */
export const sessionWxToken = async () => {
	const route = useRoute();
	let { accesstoken, refreshtoken, tenantId } = route.query;
	// 存储token 信息
	Session.set('token', accesstoken);
	Session.set('refresh_token', refreshtoken);
	Session.set('tenantId', tenantId);
	Session.set('isWxLogin', true);
	//获取用户信息
	await useUserInfo().setUserInfos();
};
